Namespace - LJCNetCommon
Parameters
name - The element name.
text - The element content text.
textState - The current text state values.
attribs - The element attributes.
addIndent -
Indicates if the element can be indented.
childIndent -
Indicates if the child indent should be applied.
isEmpty - Indicates if an empty element.
close - Indicates if the element will be closed.
Returns
The HTML element.
Gets an element.
Remarks
GetCreate() is a "GetText" method which creates the element or element
opening tag and returns the text value. It is called from other element
create methods.
The addIndent parameter defaults to true, which starts the text with the
current indent string.
The isEmpty element defaults to false, which does not add the empty
element slash.
If isEmpty is true, the empty element slash is added and the close
parameter is ignored. The element will not include the closing tag.
The ChildIndentCount is incremented if the element is not empty and
not closed.
Example
C# |
var textState = new TextState();
var xb = new XMLBuilder(textState);
var attribs = new Attributes()
{
{ "name", "Someone" },
};
var result = xb.GetCreate("Person", textState, null, attribs);
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.